package com.sina.mysql.utils;

import java.io.Serializable;

/**
 * @ClassName UserContext
 * @Description:
 * @Author 段浩杰
 * @Date 2018/8/22 17:47
 * @Version 1.0
 */
public class UserContext {

    private final Serializable userId;

    private final String realClientIp;

    /**
     * 地理定位
     */
    private final Position position;

    public UserContext(Serializable userId, String realClientIp) {
        this.userId = userId;
        this.realClientIp = realClientIp;
        this.position = null;
    }

    public UserContext(Serializable userId, String realClientIp,Position position) {
        this.userId = userId;
        this.realClientIp = realClientIp;
        this.position = position;
    }

    public Serializable getUserId() {
        return userId;
    }

    public String getRealClientIp() {
        return realClientIp;
    }

    public Position getPosition() {
        return position;
    }
}
